-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Infra UI] Disable Infrastructure and Metrics alerts in Serverless #167978
[Infra UI] Disable Infrastructure and Metrics alerts in Serverless #167978
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
03eb501
to
600f3f7
Compare
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
600f3f7
to
4e29533
Compare
4e29533
to
bbeb9a0
Compare
bbeb9a0
to
f11efeb
Compare
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 💯
It works as expected - the only thing we discussed and I am adding here as well for visibility:
The xpack.observability.unsafe.thresholdRule.enabled: true
setting is needed when the infra
plugin is enabled in order to make this work.
EuiPopover, | ||
EuiHeaderLink, | ||
EuiContextMenu, | ||
import { EuiPopover, EuiHeaderLink, EuiContextMenu } from '@elastic/eui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We can merge eui imports:
import { EuiPopover, EuiHeaderLink, EuiContextMenu } from '@elastic/eui'; | |
import { | |
type EuiContextMenuPanelDescriptor, | |
type EuiContextMenuPanelItemDescriptor, | |
EuiPopover, | |
EuiHeaderLink, | |
EuiContextMenu, | |
} from '@elastic/eui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch, thank you!
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Thank you for the review @jennypavlova! About the setting issue, I talked to the actionable observability team and @roshan-elastic, for now we've decided to put the whole "Alerts and rules" dropdown behind another feature flag (issue with more context) and wait until Custom Threshold rule is generally available in serverless. But this does not prevent us from merging this PR as now the custom threshold in Infra is hidden by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AO changes LGTM
@@ -166,7 +166,6 @@ export enum MetricsExplorerChartType { | |||
export enum InfraRuleType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why we have this type in observability plugin, we should clean this up. (We should check it at #159340)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #166749 ## Summary This PR adds serverless functional tests for the infra plugin. The main goal is to make sure that the app loads all the pages and successfully navigates between them. As we already have functional tests covering the whole functionality here we want to cover the differences with serverless and some basic checks ensuring that base functionality works correctly. - Update the test to cover disabling the create rule button added [here](#167978): ([x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts](87fb991#diff-76bd05d3fed2c44187682e27b4030ddb9cba1a36235321e0db1b371ef6739cc9))⚠️ The tests for the second AC point related to user roles will go in a[ separate issue ](#168931) Test server run: `node scripts/functional_tests_server.js --config=x-pack/test_serverless/functional/test_suites/observability/config.ts` Tests run: `node scripts/functional_test_runner --config=x-pack/test_serverless/functional/test_suites/observability/config.ts --grep "Observability Infra"`
…lastic#167978) Closes elastic#164683 ## Summary This PR disables the infrastructure, metrics and logs alerts rule in Serverless: - Deletes the code responsible for the "Metric Anomaly" rule as it was [previously disabled](elastic#93813) with plans to re-enable it as the previous PR describes but that never happened. - Adds feature flags for all three types of alert rules - Prevents rules registration in serverless based on the feature flags - Adds logic for showing/hiding items in the "Alerts and rules" dropdown - Disables custom threshold rule in the Infra UI by default in serverless as the rule needs to first be enabled by default by @elastic/actionable-observability team ([context](https://elastic.slack.com/archives/C023GDA0WMP/p1696853751040269)) **Dropdown**  **Host details**  ### How to test - Checkout locally Run in Serveless mode - Enable, Infra plugin, custom threshold in Infra, and custom threshold rule in general: ``` xpack.infra.enabled: true xpack.infra.featureFlags.customThresholdAlertsEnabled: true xpack.observability.unsafe.thresholdRule.enabled: true ``` - Go to `/app/metrics/hosts` and make sure there are no "Infrastructure" and "Metrics" items in the "Alerts and rules" dropdown - Click on "Manage rules" in the "Alerts and rules" dropdown, then "Create rule" to open the rule selection flyout - Make sure there are no rules for "Inventory", "Metrics" or "Logs" threshold - Run Kibana in traditional mode - Make sure the "Alerts and rules" dropdown looks as usual and you can create "Infrastructure" and "Metrics" alerts --------- Co-authored-by: Kibana Machine <[email protected]>
Closes elastic#166749 ## Summary This PR adds serverless functional tests for the infra plugin. The main goal is to make sure that the app loads all the pages and successfully navigates between them. As we already have functional tests covering the whole functionality here we want to cover the differences with serverless and some basic checks ensuring that base functionality works correctly. - Update the test to cover disabling the create rule button added [here](elastic#167978): ([x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts](elastic@87fb991#diff-76bd05d3fed2c44187682e27b4030ddb9cba1a36235321e0db1b371ef6739cc9))⚠️ The tests for the second AC point related to user roles will go in a[ separate issue ](elastic#168931) Test server run: `node scripts/functional_tests_server.js --config=x-pack/test_serverless/functional/test_suites/observability/config.ts` Tests run: `node scripts/functional_test_runner --config=x-pack/test_serverless/functional/test_suites/observability/config.ts --grep "Observability Infra"`
Closes #164683
Summary
This PR disables the infrastructure, metrics and logs alerts rule in Serverless:
Dropdown

Host details

How to test
/app/metrics/hosts
and make sure there are no "Infrastructure" and "Metrics" items in the "Alerts and rules" dropdown